#include <asm/mach/map.h>
#include "chip.h"
#include <mach/io.h>

struct map_desc fullhan_io_desc[] = {
	{
		.virtual	= VA_RAM_REG_BASE,
		.pfn		= __phys_to_pfn(RAM_BASE),
		.length		= SZ_16K,
		.type		= MT_MEMORY_RWX,
	},
	{
		.virtual	= VA_DDRC_REG_BASE,
		.pfn		= __phys_to_pfn(DDRC_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= VA_INTC_REG_BASE,
		.pfn		= __phys_to_pfn(INTC_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= VA_TIMER_REG_BASE,
		.pfn		= __phys_to_pfn(TIMER_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= VA_PMU_REG_BASE,
		.pfn		= __phys_to_pfn(PMU_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= VA_UART0_REG_BASE,
		.pfn		= __phys_to_pfn(UART0_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= VA_UART1_REG_BASE,
		.pfn		= __phys_to_pfn(UART1_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= VA_UART2_REG_BASE,
		.pfn		= __phys_to_pfn(UART2_REG_BASE),
		.length		= SZ_16K,
		.type		= MT_DEVICE,
	},

};

static inline void fullhan_map_io(void)
{
	iotable_init(fullhan_io_desc, ARRAY_SIZE(fullhan_io_desc));
}

